<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var num=1;
			switch(num)
			{
				case 1:console.log("一");
				break;
				case 2:console.log("二");
				break;
				case 3:console.log("三");
				break;
				default:console.log("非法数据");
				break;
			}
		
		</script>
		
		<script type="text/javascript">
			var score=prompt("请输入你的成绩")
		/* 	switch(parseInt(score/10))   //取整
			{
				case 6:
				case 7:
				case 8:
				case 9:
				case 10:
				alert("合格");
				break;
				default:
				alert("不合格");
				break;
				
			} */
			switch(true)
			{
				case score>=60:
				alert("合格");
				break;
				default:
				alert("不合格");
				break;
				
			}
		</script>
	</head>
	<body>
	</body>
</html>